|
|
|
|
|
|
|
Listing 16.8. Creating the Equipment and the Supplier tables. |
|
|
|
|
|
|
|
|
CREATE TABLE Equipment
(EquipID TEXT (10),
EquipName TEXT(30),
DatePurchased DATE,
CONSTRAINT PKEquipID PRIMARY KEY (EquipID))
CREATE TABLE Supplier
(SupplierID TEXT (10),
SupplierName TEXT(30),
SupplierAddress MEMO,
CONSTRAINT PKSupplier PRIMARY KEY (SupplierID)) |
|
|
|
|
|
|
|
|
Figure 16.7.
Supplier and Equipment tables in NORMDAT6.MDB. |
|
|
|
|
|
|
|
|
The next two data tables describe the relationships between Supplier and Equipment and between Supplier and Departments. You remember that departments can be restricted to certain suppliers when repairing or replacing equipment. By setting up a table such as the DeptSupplier table described next, you can easily maintain a list of valid suppliers for each department. Similarly, as new suppliers are discovered for equipment, they can be added to the EquipSupplier table. Refer to Table 16.6 for a sample list of fields. |
|
|
|
|
|